﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FreedomERP.Comm;
using FreedomERP.Models;
using FreedomERP.Models.Bd;
using System.Collections;
using System.Web;

namespace FreedomERP.Services.Bd
{
    /// <summary>
    /// 商品，库存管理业务层接口
    /// 作者：陈新杰
    /// </summary>
    interface IBdProductService
    {
        /// <summary>
        /// 获取商品信息，如果参数为空，则该参数不参与查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fNumber"></param>
        /// <param name="fName"></param>
        /// <param name="fModelId"></param>
        /// <param name="fUnitId"></param>
        /// <param name="fReMark"></param>
        /// <param name="fFromQty"></param>
        /// <param name="fEndQty"></param>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        List<BdProduct> getProducts(String fId, String fNumber, String fName, String fModelId, String fUnitId, String fReMark, String fFromQty, String fEndQty, String fProdInvStatusName, String sortColumn, Boolean isASC, int start, int limit, out int totalCount);

        /// <summary>
        /// 获取商品信息，如果参数为空，则该参数不参与查询
        /// </summary>
        /// <param name="fId"></param>
        /// <param name="fNumber"></param>
        /// <param name="fName"></param>
        /// <param name="fModelId"></param>
        /// <param name="fUnitId"></param>
        /// <param name="fReMark"></param>
        /// <param name="start"></param>
        /// <param name="limit"></param>
        /// <returns></returns>
        List<LCProductInfo> getProductInfos(String fId, String fNumber, String fName, String fModelId, String fUnitId, String fReMark, String fProdInvStatusName, String sortColumn, Boolean isASC, int start, int limit, out int totalCount, string currAccountOrgunitId);

        /// <summary>
        /// 保存产品信息
        /// </summary>
        /// <param name="product"></param>
        /// <returns></returns>
        void saveOrUpdateProductInfo(LCProductInfo productinfo, String fAccountId, out String Fid);

        /// <summary>
        /// 根据产品Id将其产品信息状态改为无效
        /// </summary>
        /// <param name="productId"></param>
        /// <returns></returns>
        void deleteProduct(String productId);

        /// <summary>
        /// 获取商家的全部商品类型
        /// </summary>
        List<ProductModelType> getModelTypeList(string currAccountOrgunitFId);

        /// <summary>
        /// 根据产品FNumber获取产品信息
        /// </summary>
        /// <param name="productId"></param>
        /// <author>梁建东</author>
        /// <returns></returns>
        ProductInfo GetProductMsgByFNumber(String FNumber);

        /// <summary>
        /// 根据FId获取产品
        /// </summary>
        /// <param name="FId"></param>
        /// <author>姚少鹏</author>
        /// <returns></returns>
        BdProduct getProductByFId(String FId);

        /// <summary>
        /// 根据产品类型获取产品信息
        /// </summary>
        /// <param name="FType"></param>
        /// <author>姚少鹏</author>
        /// <returns></returns>
        List<ProductInfo> getProductInfoByFType(String FType);

        /// <summary>
        /// 获取商家的全部商品单位
        /// <author>梁建东</author>
        /// </summary>
        List<ProductUtil> getUnitList(string currAccountOrgunitFId);

        /// <summary>
        /// 统计产品进出货
        /// <author>梁建东</author>
        /// </summary>
        List<ProductOutInCount> ProductOutInCount(Hashtable filters);

        /// <summary>
        /// 导出统计产品进出货信息到excel
        /// </summary>
        /// <author>梁建东</author>
        /// <returns></returns>
        void ExportProductOutInCountToExcel(Hashtable filters, string serverPath, HttpResponseBase response);

        /// <summary>
        /// 	获取产品库存状态类型
        /// </summary>
        /// 	<author>陈新杰</author>
        List<ProductInvStatusType> getProdInvStatusTypeList();

        /// <summary>
        /// 	导出产品信息到excel
        /// </summary>
        /// 	<author>陈新杰</author>
        /// <returns></returns>
        void ExportProductsInfosToExcel(string serverPath, HttpResponseBase response, String fNumber, String fName, String fModelId, String fReMark, String fProdInvStatusName, String sort, String dir,string currAccountOrgunitId,string currAccountOrgunitName);

    }
}
